LassoScript Utility
Basics Browse Detail

[Image->Save]

Tag Link [Image->Save] Category Image
Type Member Source Available Yes
Support Preferred Version 7.0
Change Unchanged Data Source Any
Output Type None Security File
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0

Description

Converts and saves the image to a file in a format defined by the file extension. A -Quality parameter specifies the image compression ratio (integer value of 1-100) used when saving to JPEG or GIF format.

Syntax

[Image Variable->(Save: '/folder/image.jpg', -Quality=100)]

Parameters

Optional Parameters
-Quality Specifies the image compression ratio (integer value of 1-100) used when saving to JPEG format. JPEG quality conversion defaults to 90 if no -Quality parameter is specified.

Examples

To save a defined image variable to file:

Use the [Image->Save] tag on a defined image variable, specifying the desired image name, path, and format.

[Var: 'MyImage' =(Image: 'image.jpg')]
[$MyImage->(Save: '/images/image.jpg', -Quality=75)]

To convert an image file from one format to another:

Use the [Image->Save] tag on a defined image variable, changing the image file extension to the desired image format. A -Quality parameter value of 100 specifies that the resulting JPEG file will be saved at the highest-quality resolution.

[Var: 'MyImage' =(Image: '/images/image.gif')]
[$MyImage->(Save: '/images/image.jpg', -Quality=100)]